package com.tripwego.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.tripwego.client.jsni.PlaceDetailsResults;

public class InitSelectedPlaceEvent extends GwtEvent<InitSelectedPlaceEventHandler> {

	public static Type<InitSelectedPlaceEventHandler> TYPE = new Type<InitSelectedPlaceEventHandler>();

	private PlaceDetailsResults placeDetailsResults;

	private boolean isAddress;

	public InitSelectedPlaceEvent(PlaceDetailsResults placeDetailsResults, boolean isAddress) {
		this.placeDetailsResults = placeDetailsResults;
		this.isAddress = isAddress;
	}

	@Override
	public Type<InitSelectedPlaceEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(InitSelectedPlaceEventHandler handler) {
		handler.handleInitSelectedPlaceEvent(this);
	}

	/**
	 * @return the placeDetailsResults
	 */
	public PlaceDetailsResults getPlaceDetailsResults() {
		return placeDetailsResults;
	}

	/**
	 * @param placeDetailsResults
	 *            the placeDetailsResults to set
	 */
	public void setPlaceDetailsResults(PlaceDetailsResults placeDetailsResults) {
		this.placeDetailsResults = placeDetailsResults;
	}

	/**
	 * @return the isAddress
	 */
	public boolean isAddress() {
		return isAddress;
	}

	/**
	 * @param isAddress
	 *            the isAddress to set
	 */
	public void setAddress(boolean isAddress) {
		this.isAddress = isAddress;
	}

}